package net.zjitc.service.Impl;

import net.zjitc.mapper.AdminMapper;
import net.zjitc.pojo.Admin;
import net.zjitc.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 *
 */
@Service
@Transactional
public class AdminServiceImpl implements AdminService{
    @Autowired
    AdminMapper adminMapper;

    @Override
    public Admin login(Admin admin) {
        return adminMapper.login(admin);
    }

    @Override
    public List<Admin> agent_list() {
        return adminMapper.agent_list();
    }

    @Override
    public int add(Admin admin) {
        return adminMapper.add(admin);
    }

    @Override
    public Admin search_loginName(String login_name) {
        return adminMapper.search_loginName(login_name);
    }

    @Override
    public int deleteAgent(Integer id) {
        return adminMapper.deleteAgent(id);
    }

    @Override
    public int update(Admin admin) {
        return adminMapper.update(admin);
    }

    @Override
    public Admin findById(int id) {
        return adminMapper.findById(id);
    }
}
